package com.starleague.battletech.unit;

import java.util.Map;

import com.starleague.battletech.unit.AbstractBattletechUnit;
import com.starleague.battletech.unit.AbstractBattletechUnitComponent;
import com.starleague.battletech.unit.AbstractWeight;
import com.starleague.battletech.unit.BattletechUnitInternalStructureType;
import com.starleague.battletech.unit.IBattletechUnitInternalStructure;

public abstract class AbstractBattletechUnitInternalStructure
        extends AbstractBattletechUnitComponent
        implements IBattletechUnitInternalStructure
{
    private BattletechUnitInternalStructureType internalStructureType;

    protected AbstractBattletechUnitInternalStructure(AbstractBattletechUnit battletechUnit,
                                                      AbstractWeight weight,
                                                      BattletechUnitInternalStructureType internalStructureType)
    {
        super(battletechUnit, weight);
        this.internalStructureType = internalStructureType;
    }

    protected AbstractBattletechUnitInternalStructure()
    {
        //
    }

    @Override
    public BattletechUnitInternalStructureType getInternalStructureType()
    {
        return this.internalStructureType;
    }

    @Override
    public boolean isHittable()
    {
        return false;
    }

    @Override
    public Map<String, Object> infoProperties()
    {
        Map<String, Object> infoPropertyMap = super.infoProperties();
        infoPropertyMap.put("internalStructureType", this.internalStructureType);
        return infoPropertyMap;
    }
}
